#attribute(additional_meta) <$= project.webFonts() $> <$= project.bundleCss() $> <$ var additionalCss = page.attribute("additional_css"); if ( additionalCss ) { $> <$= additionalCss $> <$ } $> <$= project.bundleJs() $> <$= system.partial("rss.html") $> #attribute(mobile_script) #attribute(google_analytics)
#attribute(body_start) <$ var firstRowHasStyle = false; var paragraphs = page.paragraphs("Standard"); if ( paragraphs.count > 0 ) { var paragraph = paragraphs.item(0); var container = paragraph.container; if ( (paragraph.value("bgcolor") && paragraph.value("bgcolor") !== "transparent") || paragraph.value("bgimage") ){ firstRowHasStyle = true; } else if ( container ) { // check if a container has background styles set var containerstyle = container.inlineCss || ""; containerstyle = containerstyle.toString().replace(/^\s+|\s+$/gm,''); // trim() var image = container.cssBackgroundImage("bgimage"); if ( image.color && image.color !== "transparent" ){ containerstyle += " background-color: " + image.color + ";"; } if ( image.imageUrl ){ // TODO: figure out syntax to get bgimage and imagesize from image object containerstyle += " background-image: url(" + image.imageUrl + ");"; containerstyle += " background-repeat: " + image.repeat + ";"; containerstyle += " background-size: " + image.size + ";"; containerstyle += " background-position: " + image.position + ";"; containerstyle += " background-attachment: " + image.attachment + ";"; } containerstyle = containerstyle.replace(/^\s+|\s+$/gm,''); // trim() if ( containerstyle ){ firstRowHasStyle = true; } } } $>